package net.keebook.webapp.util;

import java.io.IOException;
import java.io.OutputStream;
import java.util.List;

import net.keebook.webapp.entity.KeeBook;
import net.keebook.webapp.entity.PasswordItem;

public abstract class DatabaseExport {
	private OutputStream outputStream;
	private List<PasswordItem> items;
	private KeeBook keeBook;
	
	public abstract void export() throws IOException;
	public abstract String getFileExtension();
	
	public String getFileName() {
		return getKeeBook().getName() + "." + getFileExtension();
	}
	
	public List<PasswordItem> getItems() {
		return items;
	}

	public void setItems(List<PasswordItem> items) {
		this.items = items;
	}

	public OutputStream getOutputStream() {
		return outputStream;
	}

	public void setOutputStream(OutputStream outputStream) {
		this.outputStream = outputStream;
	}

	public KeeBook getKeeBook() {
		return keeBook;
	}

	public void setKeeBook(KeeBook keeBook) {
		this.keeBook = keeBook;
	}
}
